<template>
	<view>
		<cu-custom bgColor="bg-gradual-blue" :isBack="true">
			<block slot="content">{{ title }}</block>
		</cu-custom>
		<!-- <scroll-view scroll-x class="bg-white nav text-center">
			<view class="cu-item" :class="0 == TabCur ? 'text-white cur' : ''" v-for="(item, index) in tabDataList" :key="index" @tap="tabSelect" :data-id="index">
				<text class="cuIcon-camerafill"></text>
				{{item.name}}
			</view>
			
		</scroll-view> -->
		<scroll-view scroll-x class="bg-gradual-blue nav text-center">
			<view class="cu-item" :class="0==TabCur?'text-white cur':''" @tap="tabSelect" data-id="0">
				<text class="cuIcon-camerafill"></text> 数码
			</view>
			<view class="cu-item" :class="1==TabCur?'text-white cur':''" @tap="tabSelect" data-id="1">
				<text class="cuIcon-upstagefill"></text> 排行榜
			</view>
			<view class="cu-item" :class="2==TabCur?'text-white cur':''" @tap="tabSelect" data-id="2">
				<text class="cuIcon-clothesfill"></text> 皮肤
			</view>
		</scroll-view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			title: '排行榜',
			TabCur: 0,
			scrollLeft: 0,
			tabDataList: [
				{
					id: 0,
					name: '热搜榜',
					icon: '',
					param: ''
				},
				{
					id: 1,
					name: '点击榜',
					icon: '',
					param: ''
				},
				{
					id: 2,
					name: '待添加',
					icon: '',
					param: ''
				}
			]
		};
	},
	methods: {
		tabSelect(e) {
			this.TabCur = e.currentTarget.dataset.id;
			this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
		}
	}
};
</script>

<style></style>
